-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discounts #33
Discounts #33
Conversation
JBStored721Tier storage storedTier = _storedTierOf[msg.sender][tierId]; | ||
|
||
// Parse the flags. | ||
(,,,, bool cannotIncreaseDiscountPercent) = _unpackBools(storedTier.packedBools); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks kinda crazy but in each of these unpack instances
( /* bool ignoredVar */, /* bool ignoredVar2 */, /* bool ignoredVar3 */, /* bool ignoredVar4 */, bool cannotIncreaseDiscountPercent) = _unpackBools(storedTier.packedBools);
is more readable and safe to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeaahhhhhhh.
Description
Allow tier's to have a discountPercent, tunable by the collection's owner iff the tier doesn't have a flag indicating that it can't increase the discount.
Limitations & risks
Are there any trade-off or new vulnarbility surface based on theses changes?
Check-list
Interactions
These changes will impact the following contracts:
Directly:
Indirectly: